/**
 * http://usejsdoc.org/
 */
var http = require('http');
//用于请求的选型
var options = {
		host:'localhost',
		port:'8089',
		path:'index.htm',
		method:'GET',
		headers:{   
			'Content-Type':'application/x-www-form-urlencoded',
			'Content-Length': 0  
		} 
};
//处理响应的回调函数
var callback = function(response){
	//不断更新数据
	var body = '';
	response.on('data', function(data){
		body += data;
	});
	response.on('end', function(){
		//数据接收完成
		console.log(body);
	});
	response.on('error',function(err){
		//console.log(err);
	});
};
//向服务器端发送请求
var req = http.request(options, callback);
req.end();